from pydantic import BaseModel
from typing import Union, Optional, List

class MenuData(BaseModel):
    """
    菜单信息表对应pydantic模型
    """
    menu_id: Optional[int]
    menu_name: Optional[str]
    parent_id: Optional[int] = None
    path: Optional[str] = ""
    component: Optional[str] = ""
    menu_type: Optional[str]
    perms: Optional[str] = ""
    order_num: Optional[int] = 0
    visible: Optional[str]
    status: Optional[str]

    class Config:
        from_attributes = True